package com.yyg.boot.mq;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Author 一一哥Sun
 * @Date Created in 2020/4/16
 * @Description Description
 */
@Slf4j
@Component
public class RabbitConsumer {

    @RabbitListener(queues = "firstRabbit")
    @RabbitHandler
    public void receiveMsg(String msg) {
        log.warn("接受消息---->content:{}", msg);
    }

}
